import React, {Component} from 'react'

import './index.css'

export default class Navbar extends Component {
	render(){
		return (
			<div className="navbar">
				
				{this.props.isBack?<button onClick={()=>{
					this.props.handleClick();
				}}>返回</button>:''}
				
				<h4>
					{this.props.title}
				</h4>
				
			</div>
		)
	}
	
	handleClick(){
		this.props.handleClick();
	}
}
